<?php if (!defined('THINK_PATH')) exit();?><style>
    .daterangepicker.dropdown-menu, .select2-container--open {
        z-index: 99999999;
    }
    .select2-container--default .select2-selection--single, .select2-selection .select2-selection--single {
        height:30px;
    }
    .select2-result-repository__meta {
        margin-left: 0px;
    }
    .ztree li a.curSelectedNode {
        background-color: transparent;
        border:0px;
    }
    .layui-layer-shade  {
        left:inherit;
        top:50px;
        position:absolute;
    }
    .clear{clear:both;float:none;}
</style>
<div class="row" id="myapp">

    <div class="col-xs-12" style="margin-bottom:10px;">
        <div style="background-color:#ffffff;overflow:hidden;padding:0 10px 10px 10px;border:1px solid #d2d6de;">
            <div style="float:left;margin-left:10px;margin-top:10px;">
                <span style="float:left;line-height:32px;">申请时间：</span>
                <div class="input-group input-group-sm" style="width: 250px;float:left;">
                    <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                    <input type="text" v-model="data_cycle" id="data_cycle" class="form-control pull-right" readonly>
                </div>
            </div>
            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <span style="float:left;line-height:32px;">用户昵称：</span>
                <div class="input-group input-group-sm" style="width: 250px;">
                    <input type="text" v-model="nick_name" name="keyword" class="form-control pull-right">
                </div>
            </div>
            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <span style="float:left;line-height:32px;">手机号码：</span>
                <div class="input-group input-group-sm" style="width: 250px;">
                    <input type="text" v-model="mobile_phone" class="form-control pull-right">
                </div>
            </div>
            <div class="clear"></div>
            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <span style="float:left;line-height:32px;">出入金类型：</span>
                <div class="input-group input-group-sm" style="width: 250px;">
                    <select v-model="source" class="form-control">
                        <option value="0">选择出入金类型</option>
                        <option value="1">用户余额</option>
                        <option value="2">经纪人收益</option>
                    </select>
                </div>
            </div>
            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <span style="float:left;line-height:32px;">交易类型：</span>
                <div class="input-group input-group-sm" style="width: 250px;">
                    <select v-model="type" class="form-control">
                        <option value="0">选择交易类型</option>
                        <option value="1">充值</option>
                        <option value="2">提现</option>
                    </select>
                </div>
            </div>
			<div style="float:left;margin-left:10px;;margin-top:10px;">
                <span style="float:left;line-height:32px;">备注：</span>
                <div class="input-group input-group-sm" style="width: 250px;">
                    <select v-model="remark" class="form-control">
                        <option value="">选择备注</option>
                        <option value="微信充值">微信充值</option>
                        <option value="支付宝充值">支付宝充值</option>
                        <option value="银联快捷">银联快捷</option>
                        <option value="余额提现">余额提现</option>
                        <option value="经纪人收益提现">经纪人收益提现</option>
                        <option value="资金调整">资金调整</option>
                    </select>
                </div>
            </div>

            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <button @click="query()" type="button" class="btn btn-block btn-info btn-sm" style="width:100px;">查询</button>
            </div>
            <div style="float:left;margin-left:10px;;margin-top:10px;">
                <button @click="reset_query()" type="button" class="btn btn-default btn-sm" style="width:100px;">重置</button>
            </div>
        </div>
    </div>

    <div class="col-xs-12">
        <div class="box box-danger">
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th style="width:35px;">#</th>
                        <th>申请用户</th><th>手机号码</th>
                        <th>交易类型</th><th>交易单号</th>
                        <th>出入金类型</th><th>充值金额</th><th>提现金额</th>
                        <th>状态</th><th>审核状态</th><th>备注</th><th>审核人</th><th>审核时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(index, item) in list">
                        <td>{{index+1}}</td>
                        <td><a href="javascript:void(0)" @click="gotoInfoPage(item.user_id)">{{item.nick_name}}</a></td><td>{{item.mobile_phone}}</td>

                        <td><template v-if="item.type==1">充值</template><template v-if="item.type==2">提现</template></td>
                        <td>{{item.out_trade_no}}</td>
                        <td><template v-if="item.source==1">用户余额</template><template v-if="item.source==2">经纪人收益</template></td>
                        <td>{{item.recharge | currency ''}}</td><td>{{item.withdrawals | currency ''}}</td>
                        <td><template v-if="item.state==1">成功</template><template v-if="item.state==2">失败</template></td>
                        <td>
                            <span v-if="item.audit_state==1" style="margin-right:3px;" class="badge bg-green">审核通过</span>
                            <span v-if="item.audit_state==2" style="margin-right:3px;" class="badge bg-orange">待审核</span>
                            <span v-if="item.audit_state==3" style="margin-right:3px;" class="badge bg-red">审核不通过</span>
                        </td>
                        <td>{{item.remark}}</td><td>{{item.audit_admin}}</td><td>{{item.audit_date}}</td>
                    </tr>

                    <tr>
                        <td>#</td><td>汇总：</td><td></td><td></td><td></td><td></td>
                        <td style="background-color:#dd4b39;color:#ffffff;">{{total_recharge | currency ''}}</td>
                        <td style="background-color:#dd4b39;color:#ffffff;">{{total_withdrawals | currency ''}}</td>
                        <td></td><td></td><td></td><td></td><td></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix">
                <div id="info_data" class="col-sm-5" style="top:5px;">
                    当前为 {{startRow}} 至 {{endRow}} 条数据，共 {{total}} 条，每页 {{pageSize}} 条
                </div>
                <div class="col-sm-7">
                    <ul id="paging" class="pagination pagination-sm no-margin pull-right">
                        <li><a href="javascript:void(0);" @click="showPage(firstPage)">«</a></li>
                        <li><a href="javascript:void(0);" v-bind:class="{'page_active':pageNum==item}" @click="showPage(item)" v-for="item in navigatepageNums">{{item}}</a></li>
                        <li><a href="javascript:void(0);" @click="showPage(lastPage)">»</a></li>
                    </ul>
                </div>
            </div>
            <div class="overlay hidden">
                <i class="fa fa-refresh fa-spin"></i>
            </div>
        </div>
        <!-- /.box -->
    </div>
</div>

<div class="layui-layer-shade" id="layui-layer-shade" times="1" style="z-index:19891014; background-color:#ffffff; opacity:1; filter:alpha(opacity=1);"></div>
<div class="layui-layer layui-layer-loading  layer-anim" id="layui_layer" type="loading" times="1" showtime="0" contype="string" style="z-index: 19891015;"><div id="" class="layui-layer-content layui-layer-loading0"></div><span class="layui-layer-setwin"></span></div>

<script>
    var root = 'admin';
    var d = "<?php echo ($d); ?>";
    var audit_state = "1,3";
    layuiLayerLoad();
</script>
<script src="./WebApp/Admin/View/Public/self/js/userRechargeWithdrawals/vue.js"></script>